package com.wisecoach.gatewayplus.spring.boot.autoconfigure;

import com.wisecoach.gatewayplus.connection.RawConnInfo;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.util.Map;

/**
 * {@code @author:} wisecoach
 * {@code @date:} 2023/3/6 下午1:22
 * {@code @version:} 1.0.0
 */


@ConfigurationProperties(GatewayPlusConnProperties.prefix)
public class GatewayPlusConnProperties {

    public static final String prefix = "fabric.gatewayplus.conn";

    @NestedConfigurationProperty
    private RawConnInfo singlePeerInfo;

    @NestedConfigurationProperty
    private Map<String, RawConnInfo> mspPeersInfo;

    public Map<String, RawConnInfo> getMspPeersInfo() {
        return mspPeersInfo;
    }

    public void setMspPeersInfo(Map<String, RawConnInfo> mspPeersInfo) {
        this.mspPeersInfo = mspPeersInfo;
    }

    public RawConnInfo getSinglePeerInfo() {
        return singlePeerInfo;
    }

    public void setSinglePeerInfo(RawConnInfo singlePeerInfo) {
        this.singlePeerInfo = singlePeerInfo;
    }
}
